import { network } from '@/utils';

import { basic } from '../../../../../config/Apis';

export async function queryDetailInfo(params: { id: number }) {
  return network.get(basic.staff, { params });
}

export async function operSaveOrUpdate(params: any) {
  const request = params.get('userId')
    ? network.put(basic.staff, { body: params })
    : network.post(basic.staff, { body: params });

  return request;
}

export async function operVerPhone(params: { phone: string }) {
  return network.get(basic.staff_phone, { params });
}
